package com.health.income.server.controller;

import com.health.common.core.domain.R;
import com.health.common.domain.PmsMedicDetails;
import com.health.income.server.service.MedicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName MedicController
 * @Description 描述
 * @Author Qiu Feng
 * @Date 2025/2/25 11:46
 */
@RestController
@RequestMapping("/medic")
public class MedicController {
    @Autowired
    private MedicService medicService;

    /**
     * 查询某医生的总订单数、总收入和结算记录
     */
    @GetMapping("/getMedicDetails")
    public R<PmsMedicDetails> getMedicDetails(Integer medicId) {
        PmsMedicDetails medicDetails = medicService.getMedicDetails(medicId);
        return R.ok(medicDetails);
    }

    /**
     * 查询某医生的订单记录
     */
    @GetMapping("/getMedicOrderList")
    public R<List<PmsMedicDetails>> getMedicOrderList(Integer medicId) {
        List<PmsMedicDetails> list = medicService.getMedicOrderList(medicId);
        return R.ok(list);
    }

    /**
     * 查询某医生的订单详情
     */
    @GetMapping("/getMedicOrderDetails")
    public R<PmsMedicDetails> getMedicOrderDetails(Integer medicId) {
        PmsMedicDetails medicDetails = medicService.getMedicOrderDetails(medicId);
        return R.ok(medicDetails);
    }

    /**
     * 查询病症标签列表
     * @return
     */
    @GetMapping("/getSymptomTagsAll")
    public R<List<PmsMedicDetails>> getSymptomTagsAll() {
        List<PmsMedicDetails> list = medicService.getSymptomTagsAll();
        return R.ok(list);
    }
}
